import {createRouter,createWebHistory,RouteRecordRaw} from 'vue-router'

let routes:Array<RouteRecordRaw>=[
  {
    path:"/",
    redirect:"/login"
  },
  { //登录页面
    name:"login",
    path:"/login",
    component:()=>import("@/views/Login/index.vue")
  },
  {
    name:"home",
    path:"/home",
    component:()=>import("@/views/Home.vue")
  },
  {
    name:"menu",
    path:"/menu",
    component:()=>import("@/views/menu/index.vue")
  },
  {
    name:"about",
    alias:"/myabout",//路由别名
    path:"/about",
    component:()=>import("@/views/About.vue")
  }
]

let router=createRouter({
  history:createWebHistory(),
  routes
})
export default router